package org.lzy.shop

import android.os.Environment
import java.io.File


/**
 * 一堆常量
 */
object Constant {

    // ============== 存储相关常量 ==============
    const val SP_LANGUAGE: String = "sp_language"
    const val SP_LANGUAGENAME: String = "sp_languagename"
    const val SP_NIGHTMODE: String = "sp_nightmode"

    const val KEY_SELECTED_THEME_ID: String="selected_theme_id"

    const val KEY_SELECTED_THEME_COLOR = "selected_theme_color"

    const val USERID: String = "user_id"

    const val SELECTED_CART_ITEMS = "SELECTED_CART_ITEMS"

    const val MOBILE: String = "user_mobile"
    const val TOKEN: String = "token"
    const val REFRESHTOKEN: String = "refresh_token"

    // QQ登录APP_ID（需要替换为真实的APP_ID）
    const val QQ_APP_ID = "YOUR_QQ_APP_ID"

    val PARAM_EXPIRES_IN: String= "param_expires_in"
    val PARAM_OPEN_ID: String= "param_open_in"
    val PARAM_ACCESS_TOKEN: String= "param_access_token"
    const val TWOTHOURSANDS: Int=2000

    // ============== 网络相关常量 ==============
    const val BASE_URL = "https://mall.dusksnow.top/"

    // ============== 商品相关常量 ==============
    const val GOODID: String = "goods_id"
    const val ORDERID: String = "order_id"
    const val GOODPIC: String = "goods_pic"
    const val GOODSTITLE: String = "goods_title"
    const val UPLOADPIC: String = "upload_pic"
    const val GOODSSPEC: String = "goods_spec"
    const val GOODSPRICE: String = "goods_price"
    const val GOODSNUM: String = "goods_num"
    const val GOODSTOCK: String = "goods_stock"

    // ============== 支付相关常量 ==============
    const val ALIPAY_SDK_PAY_FLAG: Int = 1
    const val ALIPALY_URL: String = ""

    // ============== 订单相关常量 ==============
    const val ORDER_POSITION: String = "order_position"

    // ============== 通用常量 ==============
    const val KEY_EXTRAS_TYPE: String = "key_extras_type"
    const val TYPE_ID: String = "typeId"
    const val FEATURE: String = "featured"
    const val ELEVEN: Int = 11

    // 添加字体大小索引常量
    const val SP_FONT_SIZE_INDEX = "sp_font_size_index"

    // ============== 路径相关常量（注意：Android 10+已过时） ==============
    const val PICTURE_DIR_NAME = "shop/picture"

    val SD_CARD: File? = Environment.getExternalStorageDirectory()
    val pictureFile: File = File(SD_CARD, "shop/picture/")

    val pictureFilePath: String = pictureFile.absolutePath + "/"
    const val EXIT_APP_TIME: Int = 2000
}